#include <bits/stdc++.h>
#define int long long 
using namespace std;

void solve(){
	int a, b;
	cin >> a >> b;
	cout << (a^b) << '\n';
}



signed main(){
	int t;
	t=1;
	while(t--){
		solve();
	}
	return 0;
}
